<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>审核通知</title>
    <#assign base=request.contextPath  />
    <base id="basePath" href="${base}">
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <script src="${base}/frame/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${base}/frame/ztree/jquery-1.4.4.min.js"></script>
    <script src="${base}/js/jquery.min.js"></script>
    <script src="${base}/js/zhang.js"></script>
    <style type="text/css">
        .layui-btn-radius{
            border-radius: 5px;
        }
    </style>
</head>
<body>
<#--<div class="demoTable"style="padding:15px;">-->
<#--<button class="layui-btn" id="btn2" data-method="offset"  type="button" style="background-color: #0092EF;">添加文章</button>-->
<#--</div>-->
<table class="layui-hide" id="test"  lay-filter="test"></table>
<script type="text/html" id="barDemo">

    {{#  if(d.tt == 3){ }}
    <button type="button"  class="layui-btn layui-btn-sm layui-btn-normal"
            lay-event="edit" style="background: #dd524d;width: 60px;">审核
    </button>
    {{#  } else { }}
    <button type="button"  class="layui-btn layui-btn-sm layui-btn-normal" style="background: #28B779;width: 60px;">已审核
    </button>
    {{#  } }}


    <#--<button type="button"  class="layui-btn layui-btn-sm layui-btn-normal"-->
    <#--lay-event="edit" style="background: #28B779;width: 60px;">审核-->
    <#--</button>-->

    <#--<i class="layui-icon layui-icon-edit" lay-event="edit" style="font-size: 20px;"></i>&nbsp;&nbsp;&nbsp;-->
    <#--<button type="button" onclick="onDelete('{{d.id}}')" class="layui-btn layui-btn-sm layui-btn-normal"-->
    <#--lay-event="del" style="background: red;width: 60px;">删除-->
    <#--</button>-->
</script>
<script>
    layui.use(['form', 'layedit', 'laydate', 'table', 'carousel'], function () {

        var carousel = layui.carousel;
        var form = layui.form
                , $ = layui.jquery
                , layer = layui.layer
                , layedit = layui.layedit
                , laydate = layui.laydate
                , table = layui.table;

        table.render({
            elem: '#test'
            ,url:'${base}/admin/noticeOrder/selectMyPage'
            ,title: '审核通知'
            ,totalRow: true
            ,toolbar: '#toolbarDemo'//打印
            ,cols:[[
                {field:'id', title: '序号',templet:function(val){
                        return val.LAY_INDEX
                    }, field: true,align:'center'}
                ,{field:'orderNumber', title: '订单号', align:'center'}
                ,{field:'content', title: '内容', align:'center'}
                ,{field:'quartersName', title: '小区', align:'center'}
                ,{field:'orderMoeny', title: '支付金额',templet:function(val){
                        if(val.orderMoeny!=""){
                            return val.orderMoeny/100;
                        }
                    },  align:'center'}
                ,{field:'typeType', title: '任务状态', templet:function(val){
                        if(val.typeType==1){
                            return "已通过";
                        };
                        if(val.typeType==2){
                            return "未通过";
                        };
                        if(val.typeType==3){
                            return "未审核";
                        }
                    }, align:'center'}
                ,{field:'flage', title: '支付状态', templet:function(val){
                        if(val.flage==undefined){
                            return "";
                        };
                        if(val.flage==1){
                            return "已支付";
                        };
                        if(val.flage==2){
                            return "未支付";
                        }
                    }, align:'center'}
                ,{field:'createTime', title: '创建时间',templet:function(val){
                        if(val.createTime==undefined){
                            return "";
                        }
                        return changeDateFormat(val.createTime);
                    },  align:'center'}
                ,{field: 'right', title:'操作',toolbar: '#barDemo', align:'center'}
            ]]
            ,id:'testReload'
            ,height:600
            ,page: {
                layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
                ,theme: '#0092EF'
                ,limit:10
            }
            ,done: function(res, curr, count){
                this.where={};
            }
        });


        //编辑弹出层
        table.on('tool(test)', function (obj) {
            var layEvent = obj.event;
            if (layEvent == "edit") {
                var data = obj.data;
                //示范一个公告层
                layer.open({
                    type: 2,
                    title: '审核通知',
                    shadeClose: false,
                    area: ['450px', '550px'],
                    content: '${base}/admin/noticeOrder/success.html?id='+data.id,
                    success: function (layero, index) {
                        var iframeWin = window[layero.find
                        ('iframe')[0]['name']]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                        //渲染一下form表单
                        iframeWin.layui.form.render('select')
                    }
                });
            }
        });
    });

</script>

</body>
</html>